using System;
using System.IO;
using System.Collections.Generic;

namespace ODSDataExtraction.DefaultExtractors
{
	internal class FileNameExtractor : DataExtractorBase
	{	
		private static readonly string fileNameKey = "FileName";
		
		public FileNameExtractor ()
		{
		}
		
		#region implemented abstract members of ODSDataExtraction.DataExtractorBase
		public override void ExtractData (FileInfo file, IDictionary<string, string> data)
		{
			if(logger.IsDebugEnabled)
				logger.DebugFormat("Extracting file name from {0}.", file);
			if(!data.ContainsKey(fileNameKey))
				data.Add(fileNameKey, file.Name);
		}
		
		#endregion
	}
}

